package jbrowser.gui;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JPanel;

public abstract class AbstractPage extends JPanel implements Page {

    protected Tab tab;
    private Page.CacheMode cacheMode = Page.CacheMode.SUPPORTS;
    private static ImageIcon icon;

    @Override
    public JComponent getComponent() {
        return this;
    }

    @Override
    public abstract String getTitle();

    @Override
    public Page.CacheMode getCacheMode() {
        return cacheMode;
    }

  
     public void setTab(Tab tab) {
        this.tab = tab;
    }

    @Override
    public Icon getIcon() {
        if (icon == null) {
     //       icon = new ImageIcon(AbstractPage.class.getResource("/jsystem/jbrowser/resource/page.gif"));
        }
        return icon;
    }
}
